<!--
 * @Descripttion : 
 * @Autor        : Lilong
 * @Date         : 2022-09-30 11:23:16
 * @LastEditTime : 2022-09-30 11:23:20
 * @FilePath     : \表单控件绑定\v-model和组件\第二种(用于自定义输入组件上)\改变默认的属性名称\配合计算属性一起使用\第四种：原生语法糖和script setup\APP.vue
-->
<script lang="ts">
    import { defineComponent, ref } from 'vue'
    import CustomInput from './CustomInput.vue'
    
    export default defineComponent({
      name:"APP",
      components: {
        CustomInput
      },
      setup(props, context) {
        const searchText2 = ref('')
    
        return {
          searchText2,
        }
      }
    })
    </script>
      
    <template>
       <custom-input
          :test="searchText2"
          @update:test="searchText2 = $event"
        ></custom-input>
        <div>{{ searchText2}}</div>
    </template>